feat(mcp): read-only MCP server (search_notes, list_notes, get_note)#23
Merged
Conversation
inode mcp runs as a Model Context Protocol stdio server so MCP-aware clients (Claude Code, Cursor) can read the knowledge base. Read-only by design — writing is reserved for a future iteration so an agent can't fill or wipe the KB without the user's intent showing up anywhere reviewable. Sensitive notes are excluded from search_notes results entirely (not just masked in the formatted output) so the calling LLM never sees their content. get_note returns masked content for sensitive notes with metadata still flowing through. The new mcp.reveal_sensitive config flag opts in to plaintext. Adds a Retrieve method on SearchService that runs the embed → vector search → threshold → decrypt pipeline without the LLM-answer step. The MCP search tool uses this directly — letting the calling agent reason over raw candidates beats handing it a pre-generated answer from a smaller local model. The CLI's Search wraps Retrieve and adds the LLM step on top. SDK: github.com/mark3labs/mcp-go v0.54.0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Design notes
Test plan
Wiring it up (Claude Code example)
```json
{
"mcpServers": {
"inode": { "command": "inode", "args": ["mcp"] }
}
}
```
🤖 Generated with Claude Code